package cc.vicp.djx314.starfood.web.personnel.order;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import cc.vicp.djx314.starfood.service.order.CurrentOrder;

@Controller
public class RefreshCurrnetOrderController {
	@Autowired
	CurrentOrder currentOrder;

	@RequestMapping(value = "/personnel/refresh", method = RequestMethod.GET)
	public ModelAndView refreshCurrnetOrder() {
		currentOrder.removeCurrentOrderByTime(0);
		ModelAndView model = new ModelAndView("jsontournamenttemplate");
		model.addObject("success", true);
		return model;
	}
}